#ifndef __NODE_H__
#define __NODE_H__

#include "board.h"

typedef struct tag_node 
{
    int score;
    int last_move;
    int alpha, beta;
    grid * g;
    struct tag_node * parent;
    int num_children;
    struct tag_node ** children;
} node;

void push_node(node * n);

node * pop_node();

void push_array(node ** a);

node ** pop_array();

void set_new_root(node ** old_root, node * new_root);

void destroy_tree(node * tree);

void cleanup_unused_nodes();

#endif
